﻿package pluginfw.nio.filters
{
    import flash.net.*;
    import flash.utils.*;
    import pluginfw.nio.imsg.*;

    public class BaseFilter extends Object
    {
        protected var buffer:ByteArray;

        public function BaseFilter()
        {
            this.buffer = new ByteArray();
            return;
        }// end function

        public function handleRead(param1:Socket) : void
        {
            param1.readBytes(this.buffer, this.buffer.length, param1.bytesAvailable);
            this.buffer.clear();
            return;
        }// end function

        public function handleWrite(param1:IMessage, param2:Socket) : void
        {
            param2.writeBytes(param1.getBuffer());
            return;
        }// end function

        public function handleConnect(param1:Socket) : void
        {
            return;
        }// end function

        public function handleDisconnect(param1:Socket) : void
        {
            return;
        }// end function

    }
}
